﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<decimal?>" %>
<%
//private object ModelValue {
//        get {
//            if (ViewData.TemplateInfo.FormattedModelValue == ViewData.ModelMetadata.Model) {
//                return String.Format(System.Globalization.CultureInfo.CurrentCulture,
//                                     "{0:0.00}", ViewData.ModelMetadata.Model);
//            }
 
//            return ViewData.TemplateInfo.FormattedModelValue;
//        }
//    }

     %>
<%= Html.TextBox("", Model, new { style = "width:75px" })%>

<script type="text/javascript">
//$(document).ready(function() {

    var control = '#<%=ViewData.TemplateInfo.GetFullHtmlFieldId("") %>';
    control = control.replace("[", "_");
    control = control.replace("]", "_");
   // window.alert(control);
    $(control).numeric({ allow: "." });
//});

</script>